#include "BoardCellShape.h"

BoardCellShape::BoardCellShape(std::wstring text):Shape()
{

	cellText = text;
	HDC hdc;
	HFONT font;

	hdc=CreateCompatibleDC(NULL);

	font=CreateFont(10,         //Height
                   0,          //Width
                   0,          //Escapement
                   0,          //Orientation
                   FW_NORMAL,  //Weight
                   false,      //Italic
                   false,      //Underline
                   false,      //Strikeout
                   DEFAULT_CHARSET,//Charset 
                   OUT_DEFAULT_PRECIS,  //Output Precision
                   CLIP_DEFAULT_PRECIS, //Clipping Precision
                   DEFAULT_QUALITY,     //Quality
                   DEFAULT_PITCH|FF_DONTCARE, //Pitch and Family
                   L"Arial");

	SelectObject(hdc, font);

	D3DXCreateText(CDirectXEngine::Instance()->d3ddev,  //Device
                     hdc,          //GDI Device Context
					 (LPCWSTR)cellText.c_str(), //Text 
                     0.001f,        //Maximum chordal deviation from true font outlines       
                     0.2f,          //Extrusion depth (along -Z axis)
                     &mesh,         //Mesh
                     NULL,          //Adjacency information
                     NULL);         //GlyphMetrics


	this->material.Diffuse.b = 0.5;
	this->material.Ambient.b = 0.5;

}

BoardCellShape::~BoardCellShape(void)
{
}
